<?php
$di->getShared('eventsManager')->attach('entity', new \Modules\Xunsearch\Library\EntityListener());